# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libtorrent
pkgver=0.13.8
pkgrel=3
pkgdesc="BitTorrent library written in C++"
url="https://rakshasa.github.io/rtorrent"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	autoconf
	automake
	libsigc++-dev
	libtool
	linux-headers
	openssl-dev>3
	zlib-dev
	"
subpackages="$pkgname-dev"
source="https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./autogen.sh
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-debug \
		--disable-instrumentation
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
417177df5b27cd8c6a6317063b0846da2690de4633836466728605c2edad2de407d29d321cc481b8d1352dd0ff6dd89f4566a830424a8cf986f2fddb04704da4  libtorrent-0.13.8.tar.gz
"
